lwipfandomcom-20200215-history
Projects that use lwIP
Micromonitor Micromonitor (aka uMon) is a boot monitor. It's a snippet of code that is used to start up an embedded system and provide an environment suitable for both system development and deployment. To read more about it, refer to the website: http://www.umonfw.com. The point of this discussion is to talk about how LWIP is used in conjunction with uMon. uMon is a startup/runtime environment for embedded systems. In the nutshell, it provides a console shell with typical embedded system commands to peek/poke memory and transfer data to/from the target. In addition, it also comes with an intrisic flash file system called TFS. With TFS built into the monitor, all data can be name based rather than address based, making storage of configuration files and executables much easier to maintain. Finally, uMon provides the application with an API that allows the application to hook up to the monitor's already established facilities without the need to really be aware of the underlying hardware. With this established environment, a developer can now build a simple embedded application that starts off with API hooks that significantly reduce the need to be hardware-specific. Then as the project evolves, the hooks can either be maintained or replaced by OS-specific drivers and/or interfaces. This is where the LWIP application comes in. The uMon distribution (a tarball found at http://www.umonfw.com) comes with the source code for the monitor, but also includes several different applications that can be run by simply hooking to the monitors's API. One of these demo applications is centered around LWIP, and hooks LWIP 1.3.0 to the hardware's ethernet interface using uMon's API. As a result, any embedded system that runs uMon will automatically be supported by a raw-api-mode LWIP based application. The demo includes a UDP server and a TCP based HTTP server that allows remote users to issue the same commands (either via UDP or TCP/HTTP) as would be invoked at the serial port console connection. Most of this is modified code that came from the LWIP contrib base. It's important to note that while the code in this application is hooked to uMon, it should be quite easy to use it in any application by simply providing the ethernet hookup that uMon' API provides. This LWIP-based application will be available as part of the uMon1.16 distribution (circa Sept 2008). The uMon source tree is distributed as a tarball. Once untarred, the LWIP application is under the directory umon_apps/lwip. The majority of the code is untouched lwip-1.3.0 (directory=lwip) with a makefile and the custom code (directory=net), most of which is a modification of other source found in LWIP contrib. * eCos eCos is a royalty-free open source real-time operating system for the embedded space. One of its distinctive features is a high level of user control of operating system configuration. This fits in very well with the configuration flexibility of lwIP. It also means that eCos scales from low-end deeply embedded microcontrollers with only a few dozen K of ROM/RAM to high-end network processing workhorses. While eCos contains a port of the full-featured heavyweight BSD-derived networking stack, it also includes a port of lwIP including integration into the eCos ethernet driver framework, and the eCos serial framework for SLIP/PPP. As such, it should work immediately on any supported platform which has an ethernet driver (ARM AT91, CS8900, Intel I82559/82544/21143, VIA Rhine, PowerPC FEC, AMD PCNET, NS DP83902/83816, Realtek 8139, SMSC LAN91CXX, and many many more), or serial driver if using SLIP/PPP. At time of writing, this port is based on lwIP 1.3.2. * eCosPro eCosPro is a commercial distribution of eCos, provided by the company eCosCentric. It positions itself as having extra features and bug fixes compared to eCos as well as having commercial support. The eCosPro port of lwIP is based on the eCos port of lwIP 1.1.1 which was mostly rewritten in order to improve robustness, clarify configuration, reduce footprint, and address some design deficiencies in the original eCos port, as well as adding extra features such as zero-copy ethernet drivers. A real-world embedded web server demonstration using lwIP was built for AT91SAM7X occupying 33.2KiB ROM and 10.6KiB RAM, which includes lwIP, the application, and the multi-threaded kernel (but excludes webpage content itself). As it is a commercial product, it is not available for free download. * FreeRTOS FreeRTOS is a royalty-free open source real-time operating system for the embedded space. An embedded web server demonstration on an AT91SAM7X256 processor is available, which incorporates an lwIP port to FreeRTOS. There is also a similar webserver example for AVR32. At time of writing, these ports are based on lwIP 1.1.0. Untested/unverified contributed ports for lwIP 1.3.0 are available for STR9, AT91SAM7X, and AT91SAM9260. * QP QP is a family of lightweight, RTOS-like, open source, state-machine frameworks for embedded microprocessors, microcontrollers, and DSPs. QP enables building well-structured event-driven embedded applications as a set of concurrently executing hierarchical state machines (UML statecharts) directly in C or C++ without big tools. QP is described in the book Practical UML Statecharts in C/C++, Second Edition: Event-Driven Programming for Embedded Systems (Newnes, 2008). QP consists of a universal UML-compliant event processor (QEP), a portable event-driven framework (QF), a tiny preemptive run-to-completion kernel (QK), and software tracing instrumentation (QS). Current versions of QP include: QP/C and QP/C++, which require about 4KB of code and a few hundred bytes of RAM, and the ultra-lightweight QP-nano, which requires only 1-2KB of code and just several bytes of RAM. The lwIP stack has been integrated with QP/C and QP/C++ frameworks. The newly released QP-lwIP integration example code provides all you need to develop professional TCP/IP applications with lwIP, including DHCP, AUTOIP, UDP, and an advanced web server with Server-Side Includes (SSI) and Common Gateway Interface (CGI) capabilities. Unlike other existing lwIP adaptations, QP-lwIP integration has been carefully designed for hard real-time control-type applications, in which the TCP/IP stack is used to monitor and configure the embedded device as well as to provide remote user interface (e.g., by means of a web browser). The QP-lwIP integration uses exclusively the native event-driven lwIP API. No external RTOS component is needed to achieve fully deterministic real-time response of active object tasks prioritized above the lwIP task. The lwIP source code has not been modified in any way to match the event-driven, run-to-completion execution model underlying QP. In other words, QP works with the standard lwIP code, as distributed from the lwIP homepage. The example code accompanying the extensive Application Note runs on the LM3S6965 Cortex-M3 MCU from Luminary Micro (now Texas Instruments) with integrated Ethernet MAC and PHY. But the QP-lwIP integration has been carefully designed for portability. All hardware-specific code is clearly separated in the Ethernet/lwIP device driver with the clean interface to the lwIP stack and the QP application. At time of writing, this port is based on lwIP 1.4.0. *'RTL-lwIP' RTL-lwIP is the porting of the lwIP TCP/IP stack to RTLinux-GPL. RTL-lwIP gives to RT-Tasks the chance of communicating via TCP/IP directly with other RT-Tasks or even with Linux user processes. The focus of the RTL-lwIP stack is to reduce memory usage and code size, making RTL-lwIP suitable for use in small clients with very limited resources such as embedded systems. In order to reduce processing and memory demands, RTL-lwIP uses a tailor made API that does not require any data copying. RTL-lwIP includes IP, ICMP, UDP and TCP protocols. It provides to RT-Tasks a socket-like API to communicate over a network. In this software package you'll find: *The TCP/IP stack (IPV4, IPV6, ICMP, UDP, TCP) *Asynchronous DNS resolver *Programming examples *Support for the REDD (RTLinux Ethernet Device Drivers) drivers (3c59x, 8139too and e100). RTL-lwIP is NOT a real time communication protocol since ethernet (802.3) and TCP/IP are not real time communication protocols. RTL-lwIP just gives communication via TCP/IP and all what it implies. *'mbed' mbed is a tool for rapid prototyping with microcontrollers. Among the mbed officially supported libraries there is a port of the lwIP stack to the mbed-rtos. The LPC1768 mbed is a single "System on a Chip" (based on a Cortex-M3) with just 512KB of Flash and 32KB of RAM enabling very inexpensive Internet of Things (IoT) devices. This port supports two different transports: *Ethernet *3G (PPP connection with Vodafone K3770 and K3772-Z Dongles)